<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>使用float</title>
    <style>
        .containt div{
            height: 400px;
        }
        .left {
            background-color: red;
            width: 300px;
            float:left;
        }
        .right{
            background-color: blue;
            width: 300px;
            float: right;
        }
        .center{
            background-color: yellow;
        }
    </style>
</head>

<body>
    <div class="containt">
        <div class="left"></div>
        <div class="right"></div>
        <div class="center"></div>
    </div>
</body>

</html>